package com.cloudspace.jindun.network.api;

import com.cloudspace.jindun.model.Student;
import com.cloudspace.jindun.model.User;
import com.cloudspace.jindun.network.HttpManager;
import com.cloudspace.jindun.network.base.ApiCallback;
import com.cloudspace.jindun.network.base.GsonRequest;
import com.cloudspace.jindun.network.base.RequestFactory;

/**
 * User: Cloud(32325596@qq.com)
 * Date: 2016-12-24
 * Time: 15:38
 * project: jindunnew
 * Describe 登录请求网络
 */
public class LoginApi extends BaseAPI {
    public  void getUser(String tag, String userId,String userPassword, ApiCallback<User> apiCallback) {
        String url = "http://192.168.0.122:8080/jindun/V1.0/register/auth";
        GsonRequest request = RequestFactory.newInstance()

                .createPost(url,User.class,apiCallback)
                .setParams("userId",userId)
                .setParams("userPassword",userPassword)
                .setNoCache();
        HttpManager.addRequest(request, tag);
    }
}
